import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from "typeorm";

@Entity()
export class MeetingRoom {

    @PrimaryGeneratedColumn({
        comment: "会议室ID"
    })
    id: number;
    
    @Column({
        comment: "会议室名称",
        length: 50
    })
    name: string;

    @Column({
        comment: "会议室容量"
    })
    capacity: number;

    @Column({
        comment: "会议室位置",
        length: 50
    })
    location: string;

    @Column({
        length: 50,
        comment: '设备',
        default: ''
    })
    equipment: string;

    @Column({
        length: 100,
        comment: '描述',
        default: ''
    })
    description: string;

    @Column({
        comment: "是否被预定",
        default: false
    })
    isBooked: boolean;

    @CreateDateColumn({
        comment: "创建时间"
    })
    createTime: Date;

    @UpdateDateColumn({
        comment: "更新时间"
    })
    updateTime: Date;

}
